<?php
class ControllerModuleBanner extends Controller {
    protected function index() {
    	
    	$this->data['banners'] = null;
    	
    	$this->load->model('catalog/banner');
    	
    	$this->data['banners'] = $this->model_catalog_banner->getBanners();
    	
    	$this->id = 'banner';
    	
        if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/banner.tpl')) {
            $this->template = $this->config->get('config_template') . '/template/module/banner.tpl';
        } else {
            $this->template = 'default/template/module/banner.tpl';
        }
        
        $this->render();
    }
}
?>
